import React, { Component } from "react";
import { connect } from "react-redux";
import { bindActionCreators } from "redux";
import PropTypes from "prop-types";
import { createForm } from "rc-form";

//将store注入组件的props
const mapStateToProps = () => ({});
//将action与dispatch进行绑定并注入组件的props
const mapDispatchToProps = dispatch => ({
    //区分绑定到props的action与传递的props
    actions: bindActionCreators(
        {
            dispatch,
        },
        dispatch
    )
});

@connect(mapStateToProps, mapDispatchToProps)
class ExpireDateView extends Component {
    render() {
        const { deptList = [], expiryDate } = this.props || {};
        return (
            <div className="dept-list mt-0">
                {
                    <div className="dept">
                        <div className="title-text">
                            截至{expiryDate}&nbsp;下级部门人数
                        </div>
                    </div>
                }
            </div>
        );
    }
}
export default createForm()(ExpireDateView);
